package site.zhangzhuo.learn_springboot.profileConditional;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
@Profile("weekend")
public class WeekendLibraryConfiguration {
    @Bean
    public LibraryOpeningHours weekendOpeningHours() {
        return new LibraryOpeningHours("10:00 AM", "4:00 PM");
    }

    @Bean
    public Library2 library2(LibraryOpeningHours openingHours) {
        return new Library2(openingHours);
    }
}
